<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>a.html</title>
</head>

<body style="border:1px solid black">
    a页面
    <iframe src='http://localhost:4000/c.html' id="frame" frameborder=" 0" style="border:1px solid red
    "></iframe>
    <script>
        window.onhashchange = function () {
            console.log("接受自c页面", location.hash)
        }
    </script>
</body>

</html>